package com.diaosidadui.demo;

public class Demo05 {
    public static void main(String[] args) {
        int sumEvenNumber = 0;
        for (int i = 0; i <= 100; i += 2) {
            sumEvenNumber += i;
        }
        System.out.println("奇数和"+sumEvenNumber);

        int sumOddNumber = 0;
        for(int i =1;i<100;i+=2){
            sumOddNumber+=i;
        }
        System.out.println("奇数和"+sumOddNumber);


    }
}

